package com.schoolcloud.social.service;

import com.schoolcloud.common.model.PageDTO;
import com.schoolcloud.social.dto.SocPostCreateDTO;
import com.schoolcloud.social.dto.SocPostReplyDTO;
import com.schoolcloud.social.entity.SocBard;
import com.schoolcloud.social.entity.SocBardFollow;
import com.schoolcloud.social.query.BardQuery;
import com.schoolcloud.social.query.UserForumQuery;
import com.schoolcloud.social.query.PostQuery;
import com.schoolcloud.social.query.PostRepliesQuery;
import com.schoolcloud.social.vo.*;
import com.schoolcolud.daomybatisplus.dto.MpPageUtil;

import java.util.List;


/**中间服务（帖子的跨表操作在此处）
 * @author hongmizfb
 * @date 2025/02/20
 */
public interface PostInteractionService {

    /**帖子新增，需要插入帖子数据，帖子文件数据
     * @param socPostDTO 封装实体
     */
    void addPost(SocPostCreateDTO socPostDTO);

    /**帖子列表数据封装（分页），包括帖子信息，帖子文件信息，点赞数，评论数等
     * @param query 查询条件
     * @return {@link MpPageUtil }<{@link SocPostItemVO }>
     */
    PageDTO<SocPostItemVO> getPostItemVOPage(PostQuery query);

    /**获取帖子的详细信息，包括评论，用户信息，等
     * @param query 帖子回复表的查询条件
     * @return {@link SocPostInfoVO }
     */
    SocPostInfoVO getPostInfo(PostRepliesQuery query);

    PageDTO<SocPostRepliesVO> getSocRepliesVOPage(PostRepliesQuery query);

    void addSocPostReply(SocPostReplyDTO socPostReplies);

    ForumUserVO getUserInfo(String userId);


    SocBardVO getBardInfoByPostId(String postId);

    SocBardVO getBardInfoById(String bardId);

    PageDTO<SocBardVO> getBardVoPage(BardQuery query);

    PageDTO<ForumUserVO> getForumUserInfoPage(UserForumQuery query);

    List<SocBardVO> getFollowBardByUserId(String userId);

    void followBard(SocBardFollow socBardFollow);

    void deleteFollow(SocBardFollow socBardFollow);
}
